var $ = getApp(), methods = require("../methods.js");
Page(Object.assign({}, methods, {
	data: {
		data: [],
		currentActiveIndex: 0,
		animation: true
	},
	_onLoad: function () {
		var that = this
		$.get('shop/category3', {}, function (res) {
			that.setData(res);
			that.getdownclist3(res.data[0].id);
		})
	},
	getdownclist3:function(id){
		var that = this
		$.post("shop/getdownclist3",{id:id},function(res){
			that.setData({clist:res.data});
		})
	},
	clickRootItem: function (t) {
		var e = t.currentTarget.dataset;
		this.setData({currentActiveIndex: e.rootItemIndex })
		var id = e.rootItemId;
		this.getdownclist3(id)
	},
	gotoCatproductPage: function (t) {
		var e = t.currentTarget.dataset;
		$.goto('/pages/shop/prolist?cid=' + e.id);
	},
}));